<template>
  <view class="content">
    <image class="logo"
           src="/static/logo.png"></image>
    <view class="tip">
      <view class="text">
        <text class="title"
              v-if="des">提示：进群<text class="qq">{{qq}}</text>{{des}}</text>
      </view>
      <view class="text">
        <text class="title"
              v-if="doc_url">文档地址：<text class="doc">{{doc_url}}</text></text>
      </view>
    </view>
    <view class="bt">
      <button type="primary"
              @click="clickBt">点我有惊喜</button>
    </view>
  </view>
</template>

<script>
export default {
  data () {
    return {
      des: '',
      qq: '',
      doc_url: ''
    }
  },
  onLoad () {

  },
  methods: {
    clickBt: function () {
      // this.$api.postTest({
      //   name: "足下的店",
      //   des: "自学让世界更美好"
      // }).then(res => {
      //   console.log(res)
      // }).catch(err => {
      //   console.log(err)
      // })

      this.$api.getTest().then(res => {
        this.des = res.data.des
        this.qq = res.data.qq
        this.doc_url = res.data.doc_url
      })
    }

  }
}
</script>


<style>
.content {
  text-align: center;
  height: 400upx;
}

.logo {
  height: 500upx;
  width: 500upx;
}

.title {
  font-size: 36upx;
  color: #8f8f94;
}
.text {
  margin: 50upx 20upx;
}
.tip {
  display: flex;
  justify-content: flex-start;
  align-items: flex-start;
  flex-direction: column;
}
.qq {
  color: red;
}
</style>
